home *** CD-ROM | disk | FTP | other *** search
- Computer Tyme IniTyme * Copyright 1993-94 by Marc Perkel
- All Rights Reserved * Version 2.44 * Release Date: 11-17-94
-
- Computer Tyme * 411 North Sherman, Suite 300 * Springfield Mo. 65802
- (417) 866-1222 Voice * (800) 548-5353 Sales * (417) 866-1665 Fax/BBS
-
- * We're moving! - Starting 1996 (maybe) - Computer Tyme, Fair Grove Mo. 65648
-
- IniTyme is a Windows *.INI file manipulator. It is designed to assist the
- network administrator who has to maintain INI files for many users.
-
- USAGE: INITYME ChangeFile IniFile [/Q]
- or MARXMENU INITYME ChangeFile IniFile
-
- Note: If you are running IniTyme from MarxMenu rather that INITYME.EXE,
- then all references to running INITYME are really MARXMENU INITYME.
-
- The /Q switch puts IniTyme in Quiet mode. No messages to the screen are
- displayed.
-
- Example:
- INITYME CHANGE.INI SYSTEM.INI
-
- In the above example CHANGE.INI is the control file that will control the
- changes that will be written to the target file SYSTEM.INI. You can also
- invoke IniTyme by passing only one parameter. If you pass only one
- parameter, then the extension DEF is assumed for the name of the change
- file.
-
- Example:
- INITYME SYSTEM.INI
- (SYSTEM.DEF is assumed)
-
- The ChangeFile is formatted like an INI file. A sample changefile might
- look like this:
-
- ; CHANGE.INI : A sample changefile for the IniTyme Program.
-
- subst 'C:\WINDOWS\PM4\' 'W:\PM4'
-
- [boot]
- del sound.drv
-
- del [keyboard]
-
- [386Enh]
- Paging=1
- Device=mydev.386
- foo=bar
- ADD TestMode=3
- CHANGE mydevice=mydriver.386
-
- [fonts]
- subst 'V:\' 'P:\WINDOWS\'
-
- Any line that starts with the semicolon is a comment and will not be
- processed.
-
- Adding and updating lines is done by listing the new lines as you wish them
- to appear. In the example there is a line in the [386ENH] group that reads
- PAGING=1. If the target INI files does not contain a [386ENH] group it will
- be created. The default mode is - change it if it's there, add it if
- it's not.
-
- If that group does not contain a PAGING=1 line it will be added to the
- group. If a line in the [386ENH] group already exists that sets PAGING=2 it
- will be changed to PAGING=1. The word DEVICE= is a special case if it is
- found in the [386Enh] section and it is automatically added unless the whole
- line matches something that's already there.
-
-
- ADD
- ---
-
- Using the word ADD in front of the line causes the line to be added if it
- isn't already there, but not changed if it is already there. (Add but
- don't change.)
-
-
- CHANGE
- ------
-
- Using the word CHANGE in front of the line causes the line to be changed if
- it is there, but not added if it isn't there. (Change but don't add.)
-
-
- DEL
- ---
-
- Using the word DEL in front of the line causes a matching line to be deleted
- from the INI file. The DEL command can also be used to remove entire groups
- as illustrated in the example line DEL [KEYBOARD].
-
-
- ADDITEM
- -------
-
- When using commands like Run=Prog1 Prog2 Prog3 you might want to add more
- items to the list. If you change file contains: "AddItem Run=Prog4 Prog5"
- then the result will be "Run=Prog1 Prog2 Prog3 Prog4 Prog5"
-
-
- DELITEM
- -------
-
- Similar to AddItem, DelItem removes items form a list. If your INI file
- contains "Run=Prog1 Prog2 Prog3 Prog4" and your change INI file contains
- "DelItem Run=Prog2 Prog4" then the result will be: "Run=Prog1 Prog3"
-
-
- ADDVALUE
- --------
- If a line is found, AddValue will add (or subtract for negative values)
- the amount of the line in the change file.
-
- Example:
- Original file has: NumValue=9
- Change file has: AddValue NumValue=3
- Result file will have: NumValue=12
-
-
- AFTER
- -----
-
- If you use the command AFTER <line> then the next item that is added or
- changed will be put after the line you specified. If the line you
- specified isn't found then it is added to the end of the section. The
- after command can also be used to move a line from one place to another
- within the same section.
-
- Example:
- After Run
- Foo=Bar
-
-
- BEFORE
- ------
- Before is just like after except it adds the line before the specified
- line.
-
-
- FIRST
- -----
-
- If you use the word first, then the next item added will be first in the
- section.
-
-
- SUBST
- -----
-
- The SUBST command is used to replace strings within an INI file. It can be
- used in two fashions either globally throughout the file or locally within
- a group. In the above example it is used both ways.
-
- Putting the line SUBST 'C:\WINDOWS\PM4\' 'W:\PM4' before the first group
- header will cause the path string 'C:\WINDOWS\PM4\' to be globally replaced
- throughout the file with 'W:\PM4'. In the last line of the above example the
- SUBST 'V:\' 'P:\WINDOWS\' command will replace only those strings that match
- in the group [fonts].
-
- The SUBST command also supports references to environment variables.
- Thus F:\HOME\%USER%\WINDOWS becomes F:\HOME\MARC\WINDOWS.
-
- INITYME also has special provisions for handling the [GROUPS] section on the
- PROGMAN.INI. This section numbers the groups that are referenced. INITYME
- will scan the groups listed and determine the first available group number
- when it is adding to the [GROUPS] group.
-
- To illustrate, if the PROGMAN.INI files group section reads as follows:
-
- [Groups]
- Group1=H:\WINDOWS\MAIN.GRP
- Group2=H:\WINDOWS\ACCESSOR.GRP
- Group4=H:\WINDOWS\STARTUP.GRP
- Group5=H:\WINDOWS\BP7.GRP
- Group6=H:\WINDOWS\ALDUS.GRP
- Group7=F:\HOME\MARC\WINDOWS\WORDFORW.GRP
- Group8=F:\HOME\MARC\WINDOWS\MICROSOF.GRP
- Group3=F:\HOME\MARC\WINDOWS\EDOS.GRP
-
-
- and your ChangeFile contains:
-
- [Groups]
- DEL group=BP7.GRP
- Group=MAIN.GRP
- Group=MYGROUP.GRP
- DEL group=EDOS.GRP
- Group=Z:\SYSTEM\TEST.GRP
- Group=MASTER.GRP
-
- After executing IniTyme your PROGMAN.INI group section would now read:
-
- [Groups]
- Group1=MAIN.GRP
- Group2=H:\WINDOWS\ACCESSOR.GRP
- Group4=H:\WINDOWS\STARTUP.GRP
- Group6=H:\WINDOWS\ALDUS.GRP
- Group7=F:\HOME\MARC\WINDOWS\WORDFORW.GRP
- Group8=F:\HOME\MARC\WINDOWS\MICROSOF.GRP
- Group5=MYGROUP.GRP
- Group3=Z:\SYSTEM\TEST.GRP
- Group9=MASTER.GRP
-
-
- DUPLICATES
- ----------
- Most key words in INI files are unique, with the notable exception of
- the Device= keyword in the [386enh] section. IniTyme allows you to
- specify other keywords that are allowed to be duplicated. Duplicates are
- specified at the top of the file before any sections are defined.
-
- Example:
- Duplicates Device=[386enh] ;default
- Duplicates Dups=[Section]
-
- You can also specify duplicates for all sections by specifying the
- section name [*].
-
- Example:
- Duplicates Dups=[*]
-
-
- CONDITIONALS
- ------------
-
- IniTyme supports conditional changes. If the condition is met then the
- changes are made. If statements can be nested.
-
- if [condition]
- Device=mydev.386
- add foo=bar
- else
- Device=otherdev.386
- change foo=notbar
- endif
-
-
- CONDITIONAL LIBRARY
- -------------------
-
- And
- Returns the logical And of two values.
-
- Example:
- if InGroup 'EveryOne' and InGroup 'Accounting'
-
-
- Or
- Returns the logical Or of two values.
-
- Example:
- if InGroup 'EveryOne' or InGroup 'Accounting'
-
-
- Not
- Returns the logical Not of a value.
-
- Example:
- if Not InGroup 'EveryOne'
-
-
- +
- Adds two values.
-
- Example:
- if 'A' + 'B' = 'AB'
-
-
- -
- Subtracts two values.
-
- Example:
- if 5 - 3 < 4
-
-
- =
- Compares two values and returns true if they are equal.
-
- Example:
- if 2 + 2 = 4
-
-
- <>
- Compares two values and returns true if they are not equal.
-
- Example:
- if 2 + 2 <> 5
-
-
- >
- Compares two values and returns true if the first value is greater than the
- second value.
-
- Example:
- if 'D' > 'C'
-
-
- <
- Compares two values and returns true if the first value is less than the
- second value.
-
- Example:
- if 'C' < 'D'
-
-
- >=
- Compares two values and returns true if the first value is greater than or
- equal to the second value.
-
- Example:
- if 'D' >= 'C'
-
-
- <=
- Compares two values and returns true if the first value is less than or
- equal to the second value.
-
- Example:
- if 'C' <= 'D'
-
-
- ( )
- Parens begin and end logical grouping for interpretation.
-
- Example:
- if ('A' < 'B') and (9 > (5 + 3))
-
-
- ReadEnv (Environment String)
- Returns the value of an environment variable.
-
- Example:
- if ReadEnv 'ENHANCED' = 'Y'
-
-
- ValueOf
- Return the value of an element in the current section.
-
- Example:
- if ValueOf 'PagingDrive' <> 'H'
- PagingDrive=C
- endif
-
-
- UpperCase
- Returns the UpperCase of a string.
-
- Example:
- if UpperCase ReadEnv 'ENHANCED' = 'Y'
-
-
- CPU
- Returns the class of CPU chip you are running.
-
- Example:
- if CPU >= 3
-
-
- MathChip
- Returns true if you have a math coprocessor.
-
- Example:
- if MathChip
-
-
- Display
- Returns the type of video card. Types returned are HERC, CGA, EGA, VGA.
-
- Example:
- if Display = 'VGA'
-
-
-
- InGroup (Group)
- Returns True if user is in the Novell group.
-
- Example:
- if InGroup 'EveryOne'
-
- If you are not running on Novell, you can set an environment variable
- list the groups there.
-
- Set Groups=Everyone,Accounting,Sales
-
-
- InMem (TSR)
- Returns True if the TSR is in memory. It can also detect the names of
- pending batch files that are running.
-
- Example:
- if InMem 'IPXODI'
- if InMem 'AUTOEXEC'
-
-
- VlmLoaded
- Returns True if the Novell VLM shell is loaded.
-
- Example:
- if VlmLoaded
-
-
- Station
- Returns the workstation address on a Novell network or the value set in
- the environment variable STATION=.
-
- Example:
- if Station = '250:33333'
-
-
- UserName
- Returns the Novell login name of the user, or the value set in the
- environment variable USER=.
-
- Example:
- if UserName = 'Marc'
-
-
- DayOfWeek
- Returns the first three letters of the day of the week.
-
- Example:
- if DayOfWeek = 'TUE'
-
-
- Month
- Returns the first three letters of the Month.
-
- Example:
- if Month = 'AUG'
-
-
- INIMAN COMPATIBILITY
- --------------------
- In order to make IniTyme more compatible with the popular IniMan program
- from Saber Software, I've added several new conditionals and some syntax
- enhancements. Because of differences in the design of these two
- programs, IniTyme is not 100% compatible with IniMan's DEF files. But,
- these additions are a step in that direction, and makes the transition
- significantly easier.
-
- IniTyme will search for DEF files in the current directory and the
- directory pointed to by the S_CONFIG environment variable.
-
- Unlike IniTyme, IniMan uses ";*" as a keyword for it's conditionals.
- IniTyme supports ;* for compatibility, but when given the choice,
- IniTyme's more powerful IF should be used. The ;* works like the word
- IF, but it uses the rules of IniMan instead. IniMan's ;* and IniTyme's
- IF statements can be freely mixed. IF statements can be nested.
-
- However, IniTyme supports only the jumping logic of IniMan and not what
- happens inside the jump. Because of differences in the way these two
- programs work, it would be too confusing to the end user to try to
- support both forms of logic. Changes to your DEF files may be required.
- But, with all the new features here, you're going to want to change them
- anyway.
-
- IniMan conditionals don't require quotes around strings, so quotes can
- be used optionally.
-
- If multiple conditions are specified without the use of AND, OR, or XOR;
- then AND is assumed.
-
- Example:
- ;*Groups=Accounting,Sales Users=Marc,Vicki
-
- In the above example, the condition is True only if both conditions are
- met. If you want it to be True if either condition is met, then you will
- do the following:
-
- Example:
- ;*Groups=Accounting,Sales or Users=Marc,Vicki
-
-
- IniTyme also supports the IniMan Not symbol "!". If "!" is placed in
- front of a member of the list, it means "and not this". The following
- example means if the user is in groups Accounting or Sales and the user
- isn't Marc.
-
- Example:
- if Groups=Accounting,Sales Users=!Marc
-
- Unlike IniMan, the not symbol can be mixed freely.
-
- Example:
- if Groups=Accounting,!Sales
-
-
- INIMAN CONDITIONALS
- -----------------
- IniMan conditionals can be freely mixed with IniTyme conditionals.
-
- Example:
- if Groups=Accounting,Payroll and (DayOfWeek = 'FRI')
-
-
- Groups=Group1,Group2,Group3
- Returns true if the user is a member of any of the listed groups.
-
- Example:
- if Groups=Accounting,Sales
-
-
- Users=User1,User2,User3
- Returns true if the user is one of the listed users.
-
- Example:
- if Users=Marc,Vicki,Pete,Phil,Grace
-
-
- Hardware=VGA
- Returns true if one of the listed hardware pieces is present.
-
- Example:
- if Hardware=VGA,EGA,Math,!8086
-
-
- Stations=Station1,Station2,Station3
- Returns true if the station is one of the listed stations. The
- comparison is based on partial string compares so that you could match a
- range of station numbers.
-
- Example:
- if Stations=0c3456,345,0a4b337
-
-
- Network=
- Returns true if user is on the specified network.
-
- Example:
- if NetWork=Novell
-
-
- BACKUPS
- -------
-
- Whenever INITYME runs it creates a backup of the original file with a *.BNI
- extension. If you decide you don't like the changes you've made you can
- execute a one generation restore with the command:
-
- INITYME RESTORE SYSTEM.INI
-
- This will delete the current SYSTEM.INI file and rename the SYSTEM.BNI file
- to SYSTEM.INI. If a matching BNI file is not present then the restore
- command does not do anything.
-
- If by chance you are in a situation where murphy has tried to make your day
- really bad and you've screwed up your INI files royally, be sure to remember
- the SALVAGE command from netware. But nothing, not even salvage, is an
- acceptable substitute for a current set of backups. One suggestion might be
- to use PKZIP to ZIP up a set of your pre-modified INI files. This gives you
- the opportunity to play without risk. Nothing beats backups!
-
-
- BACKUP NAME
- -----------
-
- By default, the backup extension for INI files is BNI. Hoewever, if you
- want to change this, use can use the BackupName command in the change
- file as follows:
-
- Example:
- BackupName 'MYBAK.TXT'
-
- If you want to change only the extension of the backups, then start the
- BackupName with '*.' as follows:
-
- Example:
- BackupName '*.XXX'
-
-
- NOBACKUP
- --------
-
- The NoBackup command is used if you don't want to create the BNI backup
- file. This will save disk space, however, you lose the safety of having
- the ability to undo what you just did. The BNI file is actually created
- and then deleted, so if you have Novell's salvage of and UnDelete
- command you can get the BNI file back.
-
-
- PIPING FILENAMES
- ----------------
-
- IniTyme can be used to update many INI file in bulk by creating a ListFile
- contains a list of INI files. Then simply provide IniTyme with the filename
- of the list file instead of a specific INI file. The syntax of a list file
- should be something like:
-
- \home\phil\windows\system.ini
- \home\marc\windows\system.ini
- ...etc...
-
- You can also pipe a list of files to IniTyme as follows:
-
- WHEREIS SYSTEM.INI|INITYME CHANGE.INI
-
- File name references in INITYME can include references to environment
- variables. Thus \HOME\%USER%\WINDOWS\SYSTEM.INI is a valid filename if the
- environment variable USER is set.
-
-
- LOGGING CHANGES
- ---------------
-
- If you want to create a log file of the changes that were made to the file
- add the command:
-
- LOG [FileName]
-
- in your CHANGE.INI file, before the first section header, and INITYME
- will log the changes in the FileName you specify. If the FileName isn't
- specified the default name is your INI file name with a LOG extension.
-
- If you want the log to append to and existing log file, use the command:
-
- APPENDLOG [FileName]
-
-
- YAK MODE
- --------
- If Yak is on, all changes will be displayed on the screen. To turn Yak
- on, add a line with the word "Yak" before the first section.
-
-
- TEST MODE
- ---------
-
- If you want to test a change file without changing the original INI file
- then add the word TestMode to the CHANGE.INI file before the first section
- header. In test mode the changes are written to the BNI file and the INI
- file is left untouched. You can then look at the BNI file to see the
- changes.
-
-
- COMPANION PROGRAMS INIDIF GRPTYME
- ---------------------------------
-
- Included with INITYME is INIDIF.
-
- INIDIF compares two INI files and produces a third file that contains the
- differences between the two INI files. This allows you to install a new
- windows program and compare the changed INI file to the original INI file.
- The change file can then be used with INITYME to apply the same changes to
- other INI files of other users on a network.
-
- USAGE: INIDIF NewFile OldFile ChangeFile
-
- Example:
- INIDIF SYSTEM.INI SYSTEM.OLD SYSTEM.CHG
-
- GrpTyme is a DOS utility to create and modify Microsoft Windows GRP
- files used by Program Manager. It allows network managers to add icons,
- remove icons, or modify icon information inside of Program Manager's
- group files. Network managers can also create new groups from a text
- file that has a format similar to a Windows INI file. On a network,
- GrpTyme can help automate the updating of thousands of GRP files in a
- single process. If you want to add a new program item to the desktop of
- hundreds of network Windows users, it would take a serious amount of
- work. GrpTyme can do in minutes what would normally take days to
- accomplish.
-
- GrpTyme also has the ability to look into existing GRP files and read
- the information into a GNI file. This file is a text file much like an
- INI file, and this file can me manipulated with IniTyme and then
- recompiled into a GRP file. GrpTyme is sold separately.
-
-
- WILL INITYME WORK ON BATCH FILES?
- ---------------------------------
- The short answer is NO. The reason is that INI files have a structure.
- There are headers and lines where something equals something. Batch and
- other configuration files have no rules, so changing them is a
- completely different concept.
-
- However, due to demand from users and the need to continue to eat, I've
- written another program, BatZap, which does batch and other text based
- configuration files. BatZap is to batch files what IniTyme is to INI
- files. BatZap uses a script language with over 100 powerful commands. If
- you like IniTyme, you'll love BatZap!
-
-
- WE WANT YOUR INPUT
- ------------------
-
- If you like this program and you can think of more features that it needs,
- give me a call and I will probably add them.
-
- IniTyme is licensed for $95/fileserver.
-
- IniTyme is written in the MarxMenu network system language. IniTyme is
- included free with the Network Survival Kit along with source code allowing
- you to add your own features to the program.